﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.SessionState;



namespace Appcode
{
   public static class SessionSercurity
    {
        public static void SetLoginUser(this HttpSessionState session, UserLogin user)
        {
            session["LoginUser"] = user;
        }

        public static UserLogin GetLoginUser(this HttpSessionState session)
        {
            return session["LoginUser"] as UserLogin;
        }

        public static void SetShopingCart(this HttpSessionState session, List<Images> cart)
        {
            session["ShopingCart"] = cart;
        }

        public static List<Images> GetShopingCart(this HttpSessionState session)
        {
            return session["ShopingCart"] as List<Images>;
        }
    }
}
